package cn.snorlaxzjt.LBSserver.util;



import cn.snorlaxzjt.LBSserver.po.entity.Message;

import java.util.Date;

public class MessageUtil {
        public static Message getMessageInfo(com.farsunset.cim.sdk.server.model.Message message) {
            Message messageInfo = new Message();
            messageInfo.setAction(message.getAction());
            messageInfo.setContent(message.getContent());
            messageInfo.setReceiver(Integer.parseInt(message.getReceiver()));
            messageInfo.setSender(Integer.parseInt(message.getSender()));
            messageInfo.setCreateTime(new Date(message.getTimestamp()));
            return messageInfo;
    }
}
